VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "RollLineTrimmed"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
'*******************************************************************
'  Copyright (C) 2002 Intergraph Corporation  All rights reserved.
'
'  Project: MfgPlateMarking
'
'  Abstract:    Rule for creating the Roll Line Markings in the MfgPlate command.
'               "CreateBeforeUnfold" generate 3d markings which have to be unfolded,
'               and "CreateAfterUnfold" generate 2d markings which are not unfolded
'
'  History:
'      TBH        feb. 6. 2002    created
'      MJV        2004.04.23      Included correct error handling
'
'******************************************************************

Option Explicit

Implements IJDMfgSystemMarkingRule



Private Const MODULE = "MfgPlateMarking.RollLineMark"

Private Sub Class_Initialize()
    PlMrkHelpers.Initialize
End Sub

Private Sub Class_Terminate()
    PlMrkHelpers.UnInitialize
End Sub

' ***********************************************************************************
' Public Function IJDMfgSystemMarkingRule_CreateAfterUnfold
'
' Description:  RollLines are (as the only one) generated by the unfold algorithm.
'               The only thing this rule does is adding the systemmark functionallity
'
' ***********************************************************************************
Private Function IJDMfgSystemMarkingRule_CreateAfterUnfold(ByVal Part As Object, ByVal UpSide As Long, ByVal bSelectiveRecompute As Boolean, ByVal ReferenceObjColl As GSCADMfgRulesDefinitions.JCmnShp_CollectionAlias) As GSCADMfgRulesDefinitions.IJMfgGeomCol2d
Const METHOD = "RollLineMark: IJDMfgSystemMarkingRule_CreateAfterUnfold"
On Error GoTo ErrorHandler
        Dim oSDPlateWrapper As StructDetailObjects.PlatePart
        Set oSDPlateWrapper = New StructDetailObjects.PlatePart
        Set oSDPlateWrapper.object = Part
        
        If oSDPlateWrapper.plateType = Hull Then
            Set IJDMfgSystemMarkingRule_CreateAfterUnfold = CreateRollLineMarkAndCorrugateMarks(Part, UpSide, bSelectiveRecompute, ReferenceObjColl, True, False, False, False, True)
        Else
            Set IJDMfgSystemMarkingRule_CreateAfterUnfold = CreateRollLineMarkAndCorrugateMarks(Part, UpSide, bSelectiveRecompute, ReferenceObjColl, True, False, False, False, False)
        End If
        
        Set oSDPlateWrapper = Nothing

Exit Function

ErrorHandler:
    Err.Raise StrMfgLogError(Err, MODULE, METHOD, , "SMCustomWarningMessages", 1027, , "RULES")
End Function

' ***********************************************************************************
' Function IJDMfgSystemMarkingRule_CreateBeforeUnfold
'
' Description:  User Created RollLines (from the marking line command) will be processed here.
'
' ***********************************************************************************
Private Function IJDMfgSystemMarkingRule_CreateBeforeUnfold(ByVal Part As Object, ByVal UpSide As Long, ByVal bSelectiveRecompute As Boolean, ByVal ReferenceObjColl As GSCADMfgRulesDefinitions.JCmnShp_CollectionAlias) As GSCADMfgRulesDefinitions.IJMfgGeomCol3d
Const METHOD = "RollLineMark: IJDMfgSystemMarkingRule_CreateBeforeUnfold"
On Error GoTo ErrorHandler

    Dim oGeomCol3d As IJMfgGeomCol3d
    Set oGeomCol3d = m_oGeom3dColFactory.Create(GetActiveConnection.GetResourceManager(GetActiveConnectionName))
 
    CreateAPSMarkings STRMFG_ROLL_LINES_MARK, ReferenceObjColl, oGeomCol3d
    
    'Return the 3d collection
    Set IJDMfgSystemMarkingRule_CreateBeforeUnfold = oGeomCol3d
    
Exit Function

ErrorHandler:
    Err.Raise StrMfgLogError(Err, MODULE, METHOD, , "SMCustomWarningMessages", 1027, , "RULES")
End Function


